local fuman = fk.CreateSkill{
    name = "wk_heg__fuman",
}

Fk:loadTranslationTable{
    ["wk_heg__fuman"] = "抚蛮",
    [":wk_heg__fuman"] = "出牌阶段限一次，你可以令一名其他角色交给你任意张【杀】并摸等量的牌，然后其展示所有手牌，若其中有【杀】，你可以对其造成1点伤害。",
    ["#wk_heg__fuman"] = "抚蛮：令一名其他角色交给你任意张【杀】并摸等量的牌，然后其展示所有手牌，若其中有【杀】，你对其造成1点伤害",
    ["#wk_heg__fuman-give"] = "抚蛮：交给其任意张【杀】并摸等量的牌，然后你展示所有手牌，若其中有【杀】，你造成1点伤害",

    ["wk_heg__fuman_damage"] = "造成伤害",

    ["$wk_heg__fuman1"] = "国家兴亡，匹夫有责。",
    ["$wk_heg__fuman2"] = "跟着我们丞相走，错不了。",
}

fuman:addEffect("active",{
  card_num = 0,
  target_num = 1,
  prompt = "#wk_heg__fuman",
  max_phase_use_time = 1,
  card_filter = Util.FalseFunc,
  target_filter = function(self, player, to_select, selected)
    return #selected == 0 and to_select ~= player
  end,
  on_use = function(self, room, effect)
    local player = effect.from
    local target = effect.tos[1]
    if target:isKongcheng() then return end
    if not player.dead then
      local cards = room:askToCards(target, {
        min_num = 1,
        max_num = 996,
        skill_name = fuman.name,
        pattern = "slash",
        prompt = "#wk_heg__fuman-give"
      })
      if #cards > 0 then
        room:obtainCard(player, cards, true, fk.ReasonGive, target, fuman.name)
        target:drawCards(#cards, fuman.name)
      end
    end
    if target:isKongcheng() then return end
    target:showCards(target:getCardIds("h"))
    if table.find(target:getCardIds("h"), function (cid)
      return Fk:getCardById(cid).trueName == "slash"
    end) then
      if room:askToChoice(player, {choices = {"wk_heg__fuman_damage", "Cancel"}, skill_name = fuman.name}) ~= "Cancel" then
        room:damage{
          from = player,
          to = target,
          damage = 1,
          skillName = fuman.name,
        }
      end
    end
  end,
})

return fuman